<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Raster</title>
	<link rel="stylesheet" href="../css/style.css">
	<script type="text/javascript" src="../../dist/paper-full.js"></script>
	<script type="text/paperscript" canvas="canvas1">
		var raster = new Raster('lenna'); // new Raster('http://www.lps.usp.br/~hae/apostila/imagens/lenna.jpg');
		raster.onLoad = function() {
			raster.position = view.center;
			raster.rotate(45);
			window.importJSON(project.exportJSON());
		}
	</script>
	<script type="text/paperscript" canvas="canvas2">
		window.importJSON = function(json) {
			paper.activate();
			console.log(json);
			project.importJSON(json);
		}
	</script>
</head>
<body>
	<canvas id="canvas1" width="512" height="512"></canvas>
	<canvas id="canvas2" width="512" height="512"></canvas>
	<img width="512" height="512" id="lenna" style="display: none;" src="" />
</body>
</html>
